<?php

namespace Admin\Form;

use Zend_Form;

class LoginForm extends Zend_Form
{
    public function init()
    {
        $this->addElement('text', 'userName', array(
            'required'  => true,
            'label'     => 'User Name',
            'filters'   => [
                'StringTrim'
            ],
            'validators' => [
                'Alnum'
            ],
            'maxLength' => '50'
        ));

        $this->addElement('password', 'password', array(
            'required' => true,
            'label'    => 'password',
            'maxLength' => '50'
        ));

        $this->addElements(array(
            array('submit', 'loginForm', array('label' => 'Login'))
        ));

        $this->setMethod('POST');
    }
}